<template>
父子传值
  <div>关于{{ money }}</div>
  <testCom :mon="money" @son-click="changClick"></testCom>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
import testCom from "../components/testCom.vue";
export default defineComponent({
  components: { testCom },
  setup() {
    const money = ref(100);
    const changClick = (e) => {
      console.log(e, "===e");
      money.value = money.value - e;
    };
    return {
      changClick,
      money,
    };
  },
});
</script>
